package android.fwirk.obj;

import android.location.Location;
import android.location.LocationListener;
import android.os.Bundle;
import android.util.Log;

public class CustomLocationListener implements LocationListener {
	Location location;
	boolean locationGot=false;
	public void onLocationChanged(Location location) {
		Log.d("Test","location get");
		this.location=location;
		locationGot=true;
	}
	
	public void onProviderDisabled(String provider) {
	}
	public void onProviderEnabled(String provider) {
	}
	public void onStatusChanged(String provider, int status, Bundle extras) {
	}

	public boolean hasLocation() {
		return locationGot;
	}
	
	public Location getLocation() {
		Location test=location;
		locationGot=false;
		return test;
	}

	public void setLocation(Location location) {
		this.location = location;
	}	
}
